const user = require('../models/user');
const { add, page, list, info, update, del } = require('./utils');

let addData = (body, res) => {
	add(user, body, res);
};
let getPage = (body, res) => {
	page(user, body, res, ['username', 'nickname', 'phone', 'sex']);
};
let getList = (body, res) => {
	list(user, body, res);
};
let getInfo = (body, res) => {
	info(user, body, res);
};
let updateData = (body, res) => {
	update(user, body, res);
};
let deleteData = (body, res) => {
	del(user, body, res);
};

module.exports = {
	addData,
	getPage,
	getList,
	getInfo,
	updateData,
	deleteData
};
